package com.dfbz.homework8;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashSet;

public class demo {
    public static void main(String[] args) throws IOException, IllegalAccessException, InstantiationException, ClassNotFoundException {
        //加载系统的文件的一整行  存放到一个hashset
//        HashSet<Object> hashSet = new HashSet<>();
        BufferedReader bufferedReader = new BufferedReader(new FileReader(new File("C:\\Users\\admin\\Desktop\\Properties.txt")));
        //读取文件一整行 存放到hashset中
        String str;
        while ((str=bufferedReader.readLine())!=null){
            Class<?> aClass = Class.forName(str);//获得类的全路径字节码文件
            DemoClass o = (DemoClass) aClass.newInstance();
            o.run();
        }

    }
}
